package com.example.multithread.chapter01;

import lombok.SneakyThrows;

import java.util.concurrent.atomic.AtomicInteger;

/**
 * @ClassName VolitaileEx
 * @Description TODO
 * @Author leejiliang
 * @DateTime 2020/4/30 5:12 PM
 * @Version 1.0
 */
public class VolatileEx implements Runnable{
	public static volatile AtomicInteger a = new AtomicInteger(0);
	@SneakyThrows
	@Override
	public void run() {
//		Thread.sleep(1000);
		a.getAndIncrement();
	}
}
